]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspacesView: Fix activating empty workspaces
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 17 Jan 2014 13:25:49 +0000 (08:25 -0500)
committerFlorian Müllner <fmuellner@gnome.org>
Fri, 17 Jan 2014 14:30:59 +0000 (09:30 -0500)
By default, gesture actions no longer wait for the dnd threshold to
be reached before triggering, which breaks our mixing of click- and
pan actions. Fix this by only panning after reaching the threshold
and letting the click action go through if the pan is cancelled.

https://bugzilla.gnome.org/show_bug.cgi?id=722417

js/ui/workspacesView.js

index 1d0982b7988a64a3a70b16c5b6fc7d4ba764e98c..59e968275ec6a41955d4202080200d90e72ba085 100644 (file)
@@ -405,7 +405,7 @@ const WorkspacesDisplay = new Lang.Class({
         Main.overview.addAction(clickAction);
         this.actor.bind_property('mapped', clickAction, 'enabled', GObject.BindingFlags.SYNC_CREATE);
 
-        let panAction = new Clutter.PanAction();
+        let panAction = new Clutter.PanAction({ threshold_trigger_edge: Clutter.GestureTriggerEdge.AFTER });
         panAction.connect('pan', Lang.bind(this, this._onPan));
         panAction.connect('gesture-begin', Lang.bind(this, function() {
             for (let i = 0; i < this._workspacesViews.length; i++)
@@ -413,7 +413,6 @@ const WorkspacesDisplay = new Lang.Class({
             return true;
         }));
         panAction.connect('gesture-cancel', Lang.bind(this, function() {
-            clickAction.release();
             for (let i = 0; i < this._workspacesViews.length; i++)
                 this._workspacesViews[i].endSwipeScroll();
         }));